<div class="block ui-tabs-panel deactive" id="option-ui-id-2" >
	
	<div class="section">	
		<h2><?php _e('Send a Test Email','webritismtp');?></h2><hr>	
		<form method="POST" action="#">
			<h3><?php _e('To:', 'webritismtp'); ?></h3>		
			<p><input name="webrit_to" type="text" id="webrit_to" value="" size="40" class="code" />
			<span class="description"><?php _e('Type an email address here and then click Send Test to generate a test email.', 'webritismtp'); ?></span></p>		
			<p class="submit"><input type="submit" name="webrit_test_action" id="webrit_test_action" class="btn btn-primary" value="<?php _e('Send Test', 'webritismtp'); ?>" /></p>
		</form>
		<?php // Send a test mail if necessary
			if (isset($_POST['webrit_test_action']) && isset($_POST['webrit_to'])) {				
				// Set up the mail variables
				$webrit_to = $_POST['webrit_to'];
				$subject = 'Webriti WP Mail SMTP: ' . __('Test mail to ', 'webritismtp') . $webrit_to;
				$message = __('This is dummy massage generated by  Webriti SMTP Mail WordPress plugin.', 'webritismtp');
				
				// Send the test mail
				$result = wp_mail($webrit_to,$subject,$message);				
				// Strip out the language strings which confuse users
				//unset($phpmailer->language);
				// This property became protected in WP 3.2
				
				// Grab the smtp debugging output
				//$smtp_debug = ob_get_clean();				
				// Output the response
				if($result) {
				?>
				<div id="message" class="updated fade">
					<p><strong><?php _e('Test Message Sent', 'webritismtp'); ?></strong></p>
					<p><?php _e('The result was: Test email Successfully Sent.', 'webritismtp'); ?></p>
				</div>
				<?php	} else { echo " Test email process is failed.";}
			} ?>
	</div>	
</div>